package net.sxnic.ugr.role.action;

import net.sxnic.ugr.role.Role;
import net.sxnic.ugr.role.util.RoleUtils;

@SuppressWarnings("serial")
public class Edit extends RoleAction {

	public String execute() throws Exception {
		 try {						
			 	checkRoles(Role.SYSTEM_ADMIN);
		        
		        role = authorizationManager.getRoleById(id);
		        
				//加载资源权限Map
				//loadPermMapList();
				//加载菜单树
				//loadMenuTree();
		        menuHtml = RoleUtils.createCheckboxMenuHtml(role.getMenus(), authorizationManager.getMenus(), "menu");

			} catch (Exception e) {
				e.printStackTrace();
			}
        
        return SUCCESS;
    }
	 
    
}
